package org.lvhengchang.schoolmanager.service.impl;

import java.util.List;

import org.lvhengchang.schoolmanager.bean.Student;
import org.lvhengchang.schoolmanager.dao.StudentDao;
import org.lvhengchang.schoolmanager.service.StudentService;

public class StudentServiceImpl implements StudentService{
	private StudentDao studentDao = new StudentDao();

	@Override
	public int deleteStudent(String student_id) throws Exception {
		return studentDao.deleteStudent(student_id);
	}

	@Override
	public Student loginStudent(String username, String password)
			throws Exception {
		return studentDao.loginStudent(username, password);
	}

	@Override
	public int saveStudent(Student student) throws Exception {
		return studentDao.insertStudent(student);
	}

	@Override
	public List<Student> selectByAll() throws Exception {
		return studentDao.selectAll();
	}

	@Override
	public Student selectById(String student_id) throws Exception {
		return studentDao.selectById(student_id);
	}

	@Override
	public int updateStudent(Student student) throws Exception {
		return studentDao.updateStudent(student);
	}

}
